package com.jqh.arouterdemo;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;

@Route(path = RoutePath.ACTIVITY_URL_HOME)
public class HomeActivity extends AppCompatActivity {

    @Autowired(name="name") // 如果参数和变量名一样，可以不用写name="name
    public String name;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        ARouter.getInstance().inject(this);

        Log.d("HomeActivity", name);

        setResult(100, new Intent());
    }
}
